
package  main

import (
	"encoding/json"
	"fmt"
	"strings"
)

func main() {
	str := `processCurrency=INR&amount=11.00&createTime=2020-07-16+19%3A48%3A37&merTransNo=MAL_D_1_4CE9DFCC400C17763F9EEB6870ED7722&processAmount=11.00&sign=a308568b1be0f48b067a9ca5660ac9f7ade727af23a122a0e63595acab48fe9c&currency=INR&updateTime=2020-07-16+19%3A50%3A24&pmId=paytm.wallet&transNo=20200716194837110010477101&userId=3659778&transStatus=success`
	//str2 := strings.Replace(str, "&", ",", -1)
	//str2 = strings.Replace(str, "=", ":", -1)
	//str2 = "{" + str2 + "}"
	arr := strings.Split(str, "&")
	//fmt.Println(str2)
	fmt.Println(arr)
	mp := make(map[string]string)

	for _, v := range arr {
		fmt.Println(v)
		arr2 := strings.Split(v, "=")
		mp[arr2[0]] = arr2[1]
	}

	fmt.Println(mp)
	strjson, err := json.Marshal(mp)
	if err == nil {
		fmt.Println(string(strjson))
	}
}